package singleton;

/**
 * @Author Zhang Chao
 * @Date 2021/6/5 16:52
 * @Version 1.0
 */
//饿汉式
public class SingletonDemo3 {
    private static SingletonDemo3 singletonDemo = new SingletonDemo3();

    // 私有化构造方法
    private SingletonDemo3() {
    }

    public static SingletonDemo3 getInstance() {
        return singletonDemo;
    }

}
